Elevating Detection Performance in Optical Remote Sensing Image Object Detection: A Dual Strategy with Spatially Adaptive Angle-Aware Networks and Edge-Aware Skewed Bounding Box Loss Function

In optical remote sensing image object detection, discontinuous boundaries often limit detection accuracy, particularly at high Intersection over Union (IoU) thresholds. This paper addresses this issue by proposing the Spatial Adaptive Angle-Aware (SA3) Network. The SA3 Network employs a hierarchical refinement approach, consisting of coarse regression, fine regression, and precise tuning, to optimize the angle parameters of rotated bounding boxes. It adapts to specific task scenarios using either class-aware or class-agnostic strategies. Experimental results demonstrate its effectiveness in significantly improving detection accuracy at high IoU thresholds. Additionally, we introduce a Gaussian transform-based IoU factor during angle regression loss calculation, leading to the development of Edge-aware Skewed Bounding Box Loss (EAS Loss). The EAS loss enhances the loss gradient at the final stage of angle regression for bounding boxes, addressing the challenge of further learning when the predicted box angle closely aligns with the real target box angle. This results in increased training efficiency and better alignment between training and evaluation metrics. Experimental results show that the proposed method substantially enhances the detection accuracy of ReDet and ReBiDet models. The SA3 Network and EAS loss not only elevate the mAP of the ReBiDet model on DOTA-v1.5 to 78.85% but also effectively improve the model’s mAP under high IoU threshold conditions.


Introduction
In the field of optical remote sensing image target detection, the random orientation of almost all objects in the image often leads to horizontal bounding boxes encompassing a significant amount of irrelevant background when annotating detected objects.In comparison, rotated bounding boxes can greatly improve the pixel area ratio between objects and background within the selected region, better accommodating the annotation of targets in arbitrary directions.They provide accurate information about the direction, position, and size of the targets, enabling the model to perform better in target detection tasks.Existing methods for rotated object detection are mainly built upon generic object detection approaches.They redefine the representation of detection boxes, introduce additional angular dimensions for rotated detection boxes, and optimize them through distance loss.Rotated object detection methods have played a crucial role in various fields, including text detection [1][2][3][4][5][6], face recognition [7][8][9], and remote sensing image target detection [10][11][12].
However, introducing angle parameters also introduces uncertainty into the detection task, with the most prominent issue being the discontinuous boundary problem.Additionally, because the evaluation metric for the final model is based on IoU values rather than angular differences, optimizing the predicted box angles through distance loss introduces a mismatch between loss calculation and evaluation metrics.These two issues have led to suboptimal performance of existing models under high IoU threshold conditions (IoU > 0.5).Achieving higher accuracy in rotated object detection has become a significant research focus.
This section first introduces the discontinuous boundary problem, describing the origins of the discontinuity in parameterized regression.It then discusses the mismatch between the calculation of angles in the loss function and evaluation metrics.Following that, it surveys the progress of domestic and international research and concludes by introducing the research objectives of this paper.

Discontinuous Boundary Issue
Rotated bounding boxes are commonly represented in two ways: the five-parameter representation [1,5,[11][12][13][14][15] and the eight-parameter representation [2,[16][17][18].Both representations can describe the position, size, and rotation angle of a rotated bounding box.The five-parameter representation is often preferred due to its simplicity, intuitive nature, and the reduced number of parameters for computation and storage.In this representation, scholars have devised various methods for representing rotated boxes, establishing a range for the angle in radians, binding it closely with the height and width of the detection box to avoid the confusion of multiple angle values caused by the angular periodicity.
Due to different definitions of the θ range, three major categories of rotated box definitions have gradually emerged in rotated object detection.The OpenCV definition [5,[12][13][14][15], abbreviated as OC, sets the angle range as angle ∈ (0, 90 • ], θ ∈ (0, 1  2 π], where the acute angle between the positive x-axis and the edge defined as the width is positive.The long edge definition [5,11] defines the long edge as the width and the short edge as the height.The angle θ is the angle between the long edge width and the x-axis.Based on the angle range, it is further divided into le135 and le90 definitions.The angle ranges are set as angle ∈ [−45 • , 135 ) for le135, and angle ∈ [−90 • , 90 2 ) for le90.In parameterized regression-based rotational detection methods, as illustrated in Figure 1, significant differences exist between the ideal regression path and the actual regression path under the le90 definition and the counter-clockwise (CCW) representation.When regressing candidate boxes, if the ideal regression path (indicated by the dark red dashed arrow in Figure 1a) is followed, the candidate box rotates clockwise by 1  8 π to approximate the true target box.Although the predicted box has an IoU ≈ 1 with the true target box, the loss value is significantly greater than 0. This is because the angle of the predicted box changes from − 1 2 π to − 5  8 , increasing the discrepancy with the true target box's angle of 3  8 π.Due to the periodic nature of angles, although the boxes are almost coincident visually, the angle difference leads to an increase in the loss value.In this situation, the model needs to regress along a more distant path, namely, counter-clockwise rotation by 7  8 π (indicated by the dashed red arrow in Figure 1c), achieving an IoU ≈ 1 and a loss value Loss ≈ 0 to generate the final predicted box.
In summary, the discontinuous boundary problem is primarily caused by the angular periodicity and the exchangeability of the long and short sides in the five-parameter representation.The ideal regression path exceeds the predefined range, encountering boundary issues, leading to an increase in regression loss.
Faced with this challenge, the transformation of predicted boxes under the OpenCV definition involves both the exchange of width and height, as well as angle transformation, resulting in an overall complexity that may lead to less accurate predictions in such conditions [19].In contrast, the long edge definition only necessitates considering a broad range of angle transformations when addressing the issue of discontinuous boundaries.To align with the module design in the subsequent sections of this article, the le90 definition is adopted as the angle range definition for rotated bounding boxes.Even in the case of the four-point representation method, discontinuous boundary problems may arise due to the order of corner points, a matter which will not be further elaborated upon here.

Mismatch between Loss and Evaluation Metrics
Over the years, the primary approach to improving the detection accuracy of rotated object detection models has been to propose better network architectures and more effective strategies for extracting reliable local features.However, there is a largely overlooked optimization path that has received limited research attention in the field: designing a novel loss function to replace the commonly used regression loss function, aiming to enhance the model's detection performance.In object detection, the Intersection over Union (IoU) between the detection boxes generated by the model and the ground truth boxes is a crucial evaluation metric used to calculate the mAP.Therefore, in rotated object detection, special consideration needs to be given to minimizing angle errors and maximizing IoU values.
Most existing state-of-the-art rotated object detection models largely adopt the widely used Smooth L1 loss [20,21] as the loss function for the regression branch [22,23], following common practice in general object detection.This loss calculates the value based on the numerical differences between two bounding boxes to minimize coordinate, aspect ratio, and angle deviations.As depicted in Figure 2, the curve illustrates that the angle difference between two rectangles with an aspect ratio of 1:6 and overlapping centroids does not show a linear relationship with IoU values.When the angle difference is less than 20°, a smaller angle difference results in a larger change in IoU.Specifically, when the angle difference is within 12.96°, further reduction in the angle difference leads to a sharp increase in IoU values.However, at this point, the loss value of the model's angle difference diminishes linearly.This scenario causes the model to lack sufficient loss gradient when the predicted box's angle is close to the angle of the real target box.As a result, the model fails to learn how to generate more accurately angled detection boxes, preventing the detection boxes from further aligning accurately, which is clearly not an ideal outcome.
In summary, the Smooth L1 loss is not sufficiently sensitive to small angle errors, and a good local optimum based on the Smooth L1 loss may not necessarily be a local optimum for IoU.This makes it challenging to effectively guide the model to maximize the IoU values between the detection boxes and the real target boxes.

Related Work
Due to the complexity of scenes in remote sensing images, including small sizes, large aspect ratios, randomly and densely distributed objects, and arbitrarily oriented objects, rotation object detection models based on bounding box regression continue to dominate due to their higher accuracy and robustness.Parameterized regression methods are mainly divided into two branches.
Single-stage: DAL [24] proposes dynamic adaptive learning to dynamically select high-quality anchor boxes for accurate object detection, significantly reducing the number of predefined anchor boxes.R3Det [12] introduces a feature refinement module based on RetinaNet, using a progressive regression approach for fast and accurate object detection.It also suggests a skewed IoU (SkewIoU) loss to mitigate sensitivity to angle transformations in targets with large aspect ratios.RSDet [17] regresses rotated bounding boxes using four points and introduces a modulation rotation loss to address the discontinuity issue in existing losses when facing discontinuous boundaries.S2A-Net [25] introduces a Feature Alignment Module (FAM) for adaptive alignment with high-quality anchor boxes and an Orientation-aware Detection Module (ODM) for encoding orientation information, alleviating inconsistencies between the classification and regression branches.CSL [26] transforms angle prediction from a regression problem into a classification task to address the issue of discontinuous boundaries.
Two-stage: ICN [10] designs a joint image cascade network to extract multiscale semantic features and optimize regression losses.RoI Transformer [11] predicts a coarse rotated RoI based on RPN in its first stage and refines the prediction using RoI Align in the second stage, resulting in more accurate rotated RoIs and improving both efficiency and accuracy compared to rotated RPN.SCRDet [13] uses a sampling fusion network to enhance sensitivity to small objects and proposes supervised pixel attention networks and channel attention networks for joint detection of small and cluttered objects.It combines Smooth L1 loss with IoU factors to address discontinuous boundary issues in rotated bounding boxes.Gliding Vertex [18] accurately describes target orientation by sliding along each corresponding edge of a horizontal bounding box, introducing an area ratio factor between the target and its horizontal bounding box to guide the model in predicting quadrilateral detection boxes accurately.Oriented R-CNN [22] introduces a midpoint offset representation on Faster R-CNN, modifying the output parameters of the RPN regression branch from 4 to 6 to achieve rotated candidate boxes, significantly improving detection accuracy and computational efficiency.These are mainstream state-of-the-art two-stage detection models proposed in the last three years, inheriting the architecture of Faster R-CNN [21].ReDet [23] introduces the concept of E(2)-Equivariant Steerable CNNs [27] (E(2)-CNNs) into object detection based on RoI Transformer, utilizing E2-CNNs to rewrite ResNet50 as ReResNet50.It redesigns the Rotation-invariant Region of Interest Align (RiRoIAlign) module, aligning in both channel and spatial dimensions to obtain rotation-invariant features.ReBiDet [28], based on ReDet, enhances feature fusion through the ReBiFPN module, balances the difficulty and proportion of positive samples during training using the DPRL module, and optimizes anchor box sizes and aspect ratios to further improve the model's detection performance.
Existing object detection methods more or less involve the study of discontinuous boundary issues and mismatches between loss calculation and evaluation metrics.However, researchers have primarily concentrated on improving detection accuracy at IoU = 0.5, with limited attention to enhancing accuracy at IoU = 0.55 and above.These two issues result in suboptimal performance of current models at high IoU thresholds (greater than 0.5).As detection accuracy at IoU = 0.5 approaches a bottleneck, achieving higher precision in rotational object detection is poised to become a key focus of future research.

Goal of the Research
This paper addresses two primary issues: the discontinuous boundary problem and the mismatch between loss calculation and evaluation metrics.Solutions are proposed based on the ReBiDet model, and our work is organized into the following two aspects:

Discontinuous Boundary Issue
We conduct a thorough analysis of the discontinuous boundary problem, focusing on its origins in parameterized regression.Our analysis reveals that the core issue is the inaccurate localization of detection boxes due to large-angle variations during the regression of rotated bounding boxes.To address this problem, we propose the Spatially Adaptive Angle-Aware (SA 3 ) Network, a cascaded structure designed to handle the largeangle variations caused by discontinuous boundaries.This network enhances the model's ability to adapt to complex scenarios, thereby improving the accuracy of object detection.

Mismatch between Loss Calculation and Evaluation Metrics
To tackle the issue of traditional loss functions being insensitive to Intersection over Union (IoU) values, we propose the Edge-aware Skewed Bounding Box Loss (EAS Loss).This novel loss function addresses the nonlinear decay of the loss value when the predicted box's angle closely matches the target box's angle.By incorporating this loss function, we aim to improve the alignment between the loss calculation and IoU values, enhancing overall model performance.
Additionally, we perform ablation studies and extensive comparative experiments with state-of-the-art models on two datasets to validate the effectiveness of the proposed modules and approaches.The discontinuous boundary issue fundamentally results in imprecise localization of the final detection box due to the wide range of angle variations during rotated bounding box regression.Initial rotated object detection models, such as those based on Faster R-CNN [21], incorporated an angle parameter during the bounding box regression stage.However, the precision of the prediction boxes generated by a single regression was unsatisfactory.Even in general object detection, studies have shown that when dealing with candidate boxes of varying quality generated by the RPN module, a single regression function struggles to align all predicted bounding boxes accurately with the ground truth.Subsequently, the RoI Transformer [11] proposed a two-stage regression approach to produce more accurate prediction boxes.This strategy performed well under the condition of IoU = 0.5 and has been widely accepted by researchers, continuing to be adopted by state-of-the-art rotated object detection models.However, in rotated object detection, the introduction of the parameter θ exacerbates the discontinuous boundary issue.As a result, even with two regression functions, it remains challenging to achieve precise regression tasks in rotated object detection when IoU > 0.5.

Methods
Inspired by the Cascade R-CNN [29] approach, this subsubsection decomposes the regression task for rotated bounding boxes into three stages.Specifically, three dedicated regression functions { f 1 , f 2 , f 3 } are designed for each stage.These regression functions optimize the bounding boxes generated at their respective stages.The overall regression equation is as follows: Here , F(x, b) represents the regression equation, x denotes the image features corresponding to the candidate bounding boxes, and f 1 , f 2 , f 3 represent the regression functions for the three stages.It is important to note that each regression function f t (t = 1, 2, 3) in the cascade is specifically trained for the optimization of the corresponding bounding box b t (t = 1, 2, 3) at its respective stage.This approach gradually improves the generated predicted bounding boxes through coarse regression, fine-tuning, and precision refinement.
The entire model learns automatically based on the training sample set {G i , B i }, requiring no further manual intervention, achieving the goal of adaptive angle regression.The regression process is illustrated in Figure 3.In an ideal scenario, the true target box has an angle of θ = 7 16 π.After being filtered by the RPN module, a proposal box is generated that overlaps the centroid of the ground truth box, matching its width and height, but with an angle of θ = − 1 2 π.Initially, Stage 1 performs a large-angle transformation, coarsely regressing the proposal box to the light blue Coarse Regression box.Subsequently, Stages 2 and 3 refine the regression further, resulting in the Refined Predicted box that closely aligns with the ground truth box.Based on the concept of adaptive angle-regression bounding boxes mentioned above, we have designed the SA 3 Network, as depicted in Figure 4.The input to the SA 3 Network is the candidate bounding boxes generated by RPN, and the output consists of the predicted bounding boxes and the classification of those boxes.The processing flow of the SA 3 Network is as follows: Stage One: Rotation Bounding Box Regression.The primary function is to regress horizontal candidate bounding boxes generated by RPN into rotated bounding boxes.The process involves filtering horizontal candidate bounding boxes through the DPRL sampler.Subsequently, RoI Align extracts the feature maps of RoIs.
Following the practices of many scholars in the field [11,20,21,23,30], these feature maps are resized to 7 × 7 (a compromise between computational complexity, feature expressiveness, and simplicity of network design) to facilitate subsequent classification and bounding box regression operations.These fixed-size feature map blocks are fed into the Rotated BBox Head for convolution and fully connected operations, resulting in the regression-generated rotated predicted bounding boxes and their respective classifications; Stages Two and Three: Rotation Bounding Box Angle Fine-tuning.The main function is to fine-tune various parameters of the rotated bounding boxes generated in the first stage.The process is similar to the first stage, where rotated bounding boxes are filtered through the Rotated DPRL sampler.Next, the RiRoI Align extracts feature maps corresponding to the rotated candidate bounding boxes.These feature maps are processed through the Rotated BBox Head for convolution and fully connected operations, producing refined rotated predicted bounding boxes and their respective classifications.

Boundary Box Regression Class Strategy Selection
Boundary box regression class strategies include class-agnostic and class-aware strategies.Both have their advantages and disadvantages, requiring consideration of specific application scenarios.
Class-Agnostic Boundary Box Regression Strategy.From a global perspective, in remote sensing images, the orientation of objects of each category is randomly distributed.Given the widely varying aspect ratios of the bounding boxes corresponding to all objects, it is not meaningful to consider the category of objects in the feature map during the coarse regression stage.Therefore, for the regression function f 1 (x, b) in the first stage, a classagnostic strategy is adopted for training the bounding box regression function.The network structure is depicted in Figure 5.The class-agnostic [31] strategy regresses bounding boxes without distinguishing specific categories during the process.This approach enhances recall rates, particularly in cases where there is incomplete annotation in the dataset, improving the model's robustness.Importantly, it significantly reduces the computational parameter volume of the bounding box regression branch.However, the drawback is that the classagnostic strategy regresses all objects that the network deems possibly foreground, without determining their specific category.This can lead to multiple detection boxes corresponding to a single complex-patterned object and inaccurate classification.To mitigate the impact on the final detection accuracy, class-aware strategies are employed in the subsequent two stages of regression functions.Some studies in the general object detection field have demonstrated the effective enhancement of model detection performance using class-agnostic strategies [31].Experimental findings indicate that, in cases of severe dataset category imbalance, the class-agnostic strategy effectively mitigates the impact of dataset incompleteness on the performance of the object detection model.

RoIAlign or RiRoIAlign
Class-Aware Boundary Box Regression Strategy.Unlike images captured from a horizontal perspective, objects of different categories in remote sensing images exhibit significant differences in the aspect ratios of their true target boxes.For instance, the aspect ratio of bridges and docks may exceed 1:10, while objects like planes and helicopters may have a ratio of 1:1.Directly applying the research experience of general object detection without considering the actual situation of optical remote sensing images may not be wise.Therefore, in the design of the regression functions f 2 , f 3 (x, b) for the fine-tuning and precision refinement stages, a class-aware strategy is employed.The network structure is shown in Figure 6.When using a class-aware strategy to regress bounding boxes, the regression network individually infers each category by traversing all categories, computing bounding boxes for each category in the feature map block, and outputting the coordinates of bounding boxes for all categories.Then, based on the output results of the classification network branch, the bounding boxes corresponding to the category of the classification network branch are indexed, labeled as detection boxes, and other irrelevant category bounding boxes are discarded, obtaining the final detection results.The advantage of this approach is that it allows the model to undergo fine training for each category, serving as the basis for fine regression and refinement learning, ultimately enabling the model to generate accurate detection boxes for each category's object.The drawback is that for a dataset with annotated N categories of objects, the computational complexity of the regression network branch is N times that of the class-agnostic strategy, making it less efficient.However, for this project, improving detection accuracy through algorithm design takes precedence, while also considering a reduction in computational complexity.As per the empirical knowledge of generative artificial intelligence, the size of the computed parameter quantity is positively correlated with the actual performance of the model.In experiments, it was observed that although the class-aware strategy incurs a higher computational cost, it does not necessarily achieve better detection performance when the number of categories in the dataset is imbalanced or the total number of targets is small.

RoIAlign or RiRoIAlign
In summary, when using the SA 3 Network, one should consider whether the number of targets in each category in the dataset is balanced, the total number of targets, and other practical issues.A comprehensive judgment should be made regarding whether to adopt a class-aware or class-agnostic strategy during the fine regression and refinement stages of the SA 3 Network.Inappropriate strategy selection may result in a significant reduction in the model's detection performance.

Edge-Aware Skewed Bounding Box Loss
A persistent issue in the design of regression losses for rotated object detection is the inconsistency between model training metrics and final evaluation metrics.This inconsistency acts as a bottleneck, necessitating the design of a loss function specifically tailored for rotated object detection.Such a loss function must consider the unique characteristics of this task, especially in terms of the Intersection over Union (IoU), to enhance the model's sensitivity to changes in angles.
To address this challenge, we introduce a novel regression loss, named the EAS loss.This loss function takes into account the IoU value between the predicted bounding box and the ground truth.The EAS loss effectively mitigates the inconsistency between training and evaluation metrics, enabling the model to accurately regress angles, particularly when the predicted box is close to the ground truth.

EAS Loss Design
To enhance the sensitivity to small angle deviations and improve metric consistency, a natural idea is to use IoU when regressing the angle θ.In this case, the loss calculation is defined as in Equation ( 2): However, this introduces a new problem: when the centroid of the predicted box is far from the centroid of the ground truth box, the IoU value will be very small, leading to slow angle regression by the model.Assuming the aspect ratio of the box is 1:6, as shown in Figure 7, even when the centroid of the predicted box and the ground truth box coincide, the slope of the Loss IoU value becomes flat when the angle difference θ exceeds 60°.This reduces the regression efficiency of the model for larger angle differences.
To address this, we introduce an IoU factor into the angle regression loss L * θ calculation, as shown in Equation (3): Here, L * θ adopts the calculation method of the Smooth L1 loss, leading to the ideal EAS loss calculation Equation (4): Here, eps = 10 −6 , and β and γ are adjustable variables.When β = 1 and γ = 1/9, the relationship between Loss EAS and the angle difference θ is depicted in Figure 8.When the centroids of the predicted box and the ground truth box do not coincide, the EAS loss, incorporating the IoU factor in the angle regression loss component, prevents ineffective rotations of the predicted box.When the centroids of the predicted box and the ground truth box do coincide, the IoU factor allows the model to quickly and accurately learn to generate more precise predicted boxes as the predicted and ground truth angles approach each other.This makes it an ideal angle regression loss function.The next issue is how to calculate the IoU value.Here, the IoU between the rotated bounding boxes is termed SkewIoU to distinguish it from horizontal IoU.The definition of SkewIoU is the same as IoU, as shown in Equation ( 5): where P and G are two rotated bounding boxes.To compute their intersection and union areas accurately, skewed bounding boxes are treated as polygons, and the convex polygon intersection calculation method [5] is employed to precisely calculate SkewIoU.This process involves sorting and combining the coordinates of the vertices and intersection points of the rotated boxes, followed by the application of the triangulation method to calculate the area of the intersection region.The overall computation is relatively complex, with sorting and triangulation being the primary time-consuming factors.In practical applications, libraries such as OpenCV and Shapely are often employed to calculate SkewIoU.The specific implementation and optimizations in these libraries can impact performance, but the fundamental principles of computational complexity remain unchanged.
In general object detection, the IoU loss has long been a focus for effectively mitigating the inconsistency between evaluation metrics (dominated by IoU) and regression loss calculation methods.However, in rotated object detection, due to the computationally expensive nature of SkewIoU calculation, it is primarily used for validation and evaluation and has not been widely adopted in loss functions.

Gaussian Transformation for Approximate IoU Calculation
Recent studies, such as PIoU [32], projection IoU [33], GWD [34], and KLD [35], have explored methods to simulate the approximate SkewIoU loss.Among these, GWD and KLD introduced a Gaussian modeling approach, simplifying the complex SkewIoU calculation into a more efficient process.However, their methods involve nonlinear transformations and hyperparameters in the final loss function design using Gaussian distribution distance metrics, making them not fundamentally SkewIoU.KFIoU [36] is a loss function based on the approximation of SkewIoU and center-point distance, but its performance in the proposed model in this paper is not ideal.As shown in Table 1, after incorporating the KFIoU loss, the model's AP50, AP75, and mAP all experienced varying degrees of decline.In the original paper, KFIoU achieved satisfactory results with backbone networks like ResNet-152 with large parameter sizes.In contrast, the model in this paper utilizes the ReResNet-50 backbone network with relatively fewer computational parameters, which might be one of the reasons for the performance degradation.Despite KFIoU's poor performance in ReBiDet, a simpler and more efficient method for approximating SkewIoU is worth considering.This method converts two rotated bounding boxes into Gaussian distributions, representing the overlapping region with a simpler mathematical formula and calculating the area of the minimum enclosing rectangle of this region.This approach significantly simplifies the original geometric computation while maintaining a high approximation to the exact IoU value [36].This method adheres to the SkewIoU calculation process, is mathematically rigorous, and does not introduce additional hyperparameters.Although the accuracy of the SkewIoU values obtained is relatively low, precise SkewIoU calculation is not strictly necessary in loss functions; minor errors are tolerable as long as the trend of the approximated SkewIoU matches the true value.Below are the basic steps and derivations for approximating SkewIoU using the Gaussian transformation method [36]: Transforming Rotated Rectangular Boxes into Gaussian Distributions.To begin, the rotated rectangular boxes are transformed into Gaussian distributions G(µ, Σ).Each rectangular box is represented by two parameters: the covariance matrix Σ and the center coordinates µ.For a rotated rectangular box B(x, y, w, h, θ), µ = x y , and the covariance matrix is calculated as shown in Equation ( 6): where . The final form of the covariance matrix Σ is given in Equation ( 7): The transformed Gaussian distribution is illustrated in Figure 9. Calculating Overlapping Area of Two Gaussian Distributions.The overlapping area of two Gaussian distributions is computed by multiplying the Gaussian distributions of the predicted box P and the true target box G using the Kalman filter's multiplication rule.Specifically, the predicted box's Gaussian distribution G P (µ P , Σ P ) is treated as the predicted value, and the true target box's Gaussian distribution G G (µ G , Σ G ) is treated as the observed value.This yields the approximate Gaussian distribution G I (µ I , Σ I ) for the overlapping region I, as shown in Equation ( 8): Here, αG I (µ I , Σ I ) does not have a probability sum of 1 and is not a standard Gaussian distribution.The coefficient α can be expressed by Equation ( 9): When µ P − µ G ≈ 0, α can be approximated as a constant.Since the EAS loss is computed separately for the centroids of the bounding boxes, we can consider the scenario where the centroids of the predicted box P and the ground truth box G coincide, i.e., µ P = µ G .In this case, the parameters µ I and Σ I of the Gaussian distribution G I (µ I , Σ I ) for the overlap region I are calculated using Equation (10): where K = Σ P (Σ P + Σ G ) −1 .When the central points of the predicted box P and the true target box G are close to overlapping (µ P = µ G ), the center point µ I of the Gaussian distribution for the overlap region I coincides with the central points of the predicted box P and the true target box G, as shown in Figure 10.The covariance matrix Σ I of the overlapping area I can be approximated using Equation ( 11): Calculating Areas of Externally Circumscribed Rectangles.The areas of the minimum enclosing rectangles for the predicted box P, the ground truth box G, and the overlap region I are calculated using their respective Gaussian distributions.Since the dimensions of the predicted box P and the ground truth box G are known, S P (Σ P ) and S G (Σ G ) can be directly calculated.The area S I (Σ I ) can be conveniently derived from the covariance matrix Σ I , as shown in Equation ( 12): Calculating the Approximate SkewIoU.The approximate SkewIoU (SkewIoU approx ) is calculated as follows: However, S I (Σ I ) is not the exact area of the overlap of the predicted box P and the true target box G. Since αG I (µ I , Σ I ) is not a standard Gaussian distribution and α is treated as a constant in the calculation, Xue Yang et al. derived that the upper bound of . Using this upper bound, a linear transformation is applied to expand its value range to [0, 1], resulting in the approximate SkewIoU: This approximation method for SkewIoU approx demonstrates high consistency with the true SkewIoU plain while being an ideal method for practical applications [36].Despite the complexity of the derivation, the implementation is straightforward in the EAS loss function, where SkewIoU approx is used as a factor for angle regression without introducing additional hyperparameters and not participating in the backpropagation process.
The EAS loss function is given by: where ε = 10 −6 , and β and γ are adjustable parameters.
Due to the limited research published using DOTA-v2.0,cross-performance comparisons are challenging; thus, this paper does not utilize DOTA-v2.0.Instead, DOTA-v1.5 is employed for testing and analyzing the proposed methods, as it addresses the shortcomings of DOTA-v1.0 and remains the most commonly used public object detection dataset in the remote sensing field.It is noteworthy that the creators of the DOTA dataset have not publicly released the annotations for the test set, requiring researchers to upload their detection results for evaluation, thereby restricting comprehensive analysis of experimental results.

DFShip Dataset
The DFShip dataset is a fine-grained optical remote sensing ship dataset released by the Big Data and Decision-Making (National) Laboratory for the 2023 National Big Data and Computational Intelligence Challenge [39].It comprises 41,495 images, all annotated with ship targets.The training set includes 30,285 images with corresponding target annotation files, totaling 120,605 annotated targets across 133 fine-grained categories.This makes DFShip the most detailed and extensive fine-grained ship dataset currently available, posing a significant challenge to the performance of object detection models.Both the preliminary and final test sets consist of 11,210 images, each presenting varying levels of detection difficulty.The organizers did not provide annotation files for the test sets; participants must test locally and upload the packaged test results to a designated server for validation.Since the organizers did not provide a specific name for this dataset, we refer to it as DFShip in this paper.

Setup
The experimental setup closely follows the approach described in the ReBiDet paper, with several key upgrades.The GPU configuration has been enhanced from 2 NVIDIA GTX 3090 Ti to 2 NVIDIA GTX 4090 GPUs.Additionally, the software stack has been updated: CUDA has been upgraded from version 11.8 to 12.0, PyTorch from version 1.11.0 to 1.13.1, torchvision from version 0.12.0 to 0.14.1, and the MMRotate framework from version 0.3.2 to 0.3.4.These updates ensure improved compatibility and facilitate the reproducibility of experiments across different environments.
During training, data augmentation techniques, such as horizontal and vertical flips, were applied.The batch size per GPU was set to 2, resulting in a total batch size of 4. The network was optimized using the Stochastic Gradient Descent (SGD) algorithm with a momentum of 0.9 and a weight decay of 0.0001.For the Region Proposal Network (RPN), the IoU threshold for positive samples was set to 0.7.The horizontal box Non-Maximum Suppression (NMS) threshold was set to 0.7, while the rotation box NMS threshold was set to 0.1.
The DOTA-v1.5 dataset consists of a total of 2806 images, with 1411 images in the training set, 458 images in the validation set, and 937 images in the test set.To ensure fairness in comparison experiments, we followed the practices of many scholars in the field and processed the data accordingly.Since the images in the dataset have varying sizes, the original images from the DOTA-v1.5 dataset were cropped to a size of 1024 × 1024 pixels with a stride of 824 pixels.After cropping, the DOTA-v1.5 dataset contains 15,749 images in the training set, 5297 images in the validation set, and 10,833 images in the test set.Both the training and validation sets were used for model training.Additionally, we performed multiple scale augmentation on the dataset, resizing the original 2806 images to three scales: 0.5, 1.0, and 1.5.These resized images were then cropped to 1024 × 1024 pixels with a stride of 524 pixels, resulting in a final dataset of 416,651 images for training and 71,888 images for testing.The model was trained for 12 epochs, with an initial learning rate of 0.01, and it was divided by 10 at epochs 9 and 11.
The DOTA-v1.5 dataset consists of a total of 2806 images, with 1411 images in the training set, 458 images in the validation set, and 937 images in the test set.To ensure fairness in comparative experiments, we followed established practices and processed the data accordingly.Given the varying sizes of images in the dataset, the original images were cropped to a size of 1024 × 1024 pixels with a stride of 824 pixels.After cropping, the DOTA-v1.5 dataset was expanded to include 15,749 images in the training set, 5297 images in the validation set, and 10,833 images in the test set.Both the training and validation sets were utilized for model training.Additionally, multiple scale augmentations were performed, resizing the original 2806 images to three scales: 0.5, 1.0, and 1.5.These resized images were cropped to 1024 × 1024 pixels with a stride of 524 pixels, resulting in a final dataset of 416,651 images for training and 71,888 images for testing.The model was trained for 12 epochs, with an initial learning rate of 0.01, which was reduced by a factor of 10 at epochs 9 and 11.
For the DFShip dataset, the original images are typically 1024 × 1024 in size and do not require additional cropping.Since the competition organizer's validation server only provides mAP at an IoU threshold of 0.5, the original training set was randomly split in a 4:1 ratio for this study.This resulted in a training set with 24,228 images and 96,644 annotated targets, and a test set with 6057 images and 23,961 annotated targets.The model was trained for 36 epochs, with an initial learning rate of 0.01, which was reduced by a factor of 10 at epochs 24 and 33.

Ablation Experiments of SA 3 Network
To evaluate the effectiveness of the proposed SA 3 Network, ablation experiments were conducted using ReDet and ReBiDet as baseline models.These experiments aimed to assess the impact of incorporating class-aware and class-agnostic bounding box regression strategies.
In these ablation experiments, the SA 3 Network was integrated into both ReDet and ReBiDet models to objectively evaluate its contribution.Due to the absence of ground truth annotations for the test set of the DOTA dataset, the trained models' results were packaged and uploaded.The detection metrics were then verified by the DOTA-v1.5 dataset authors using their designated servers.
Table 2 presents a performance comparison of the ReDet and ReBiDet models with and without the SA 3 Network.The integration of the SA 3 Network results in improved detection performance for both models.The mean average precision (mAP) reported in the table is computed using the COCO evaluation method, which averages the average precision (AP) values across all possible IoU thresholds.AP50 and AP75 refer to the AP at IoU thresholds of 0.5 and 0.75, respectively.The results indicate that integrating the SA 3 Network leads to improvements in mAP, AP50, and AP75 for both the ReDet and ReBiDet models.For ReDet, the class-aware strategy increases AP50 by 0.92% and AP75 by 0.84%.The class-agnostic strategy, however, shows even more significant improvements, with AP50 increasing by 1.28% and AP75 by 2.38%.Similarly, for ReBiDet, the class-aware strategy results in AP50 increasing by 0.68% and AP75 by 0.4%, while the class-agnostic strategy yields an increase of 1.33% in AP50 and 1.59% in AP75.
These results demonstrate that the SA 3 Network significantly enhances detection accuracy, particularly at higher IoU thresholds.This improvement underscores the network's ability to optimize model precision for predicting rotated bounding boxes.
Despite the expectation that the class-aware strategy would provide more accurate results due to its tailored approach for each object class, the experimental outcomes show the opposite.The class-agnostic strategy performs better, which can be attributed to the imbalanced class distribution in the DOTA-v1.5 dataset.Some classes, such as Container Crane (CC), have very few instances compared to others like Small Vehicle (SV), which has a large number of instances.Figure 11 illustrates this imbalance, with CC having only 283 instances and SV having 295,272 instances.In such cases, the class-agnostic strategy is more suitable.
To further investigate the effectiveness of the SA 3 Network and the rationale behind strategy selection, we performed random rotation and offline multi-scale augmentations on the DOTA-v1.5 dataset.The class distribution after augmentation, shown in Figure 12, remains uneven but with an increased minimum instance count for Container Crane (CC), which rises to 1719.This theoretically enhances training effectiveness.Table 3 displays the ablation experiment results using the augmented DOTA-v1.5 dataset.With the SA 3 Network, the class-aware strategy shows significant improvements over the ReDet baseline, with AP50 increasing by 1.00% and AP75 by 1.67%.The classagnostic strategy results in AP50 increasing by 0.68% and AP75 by 1.64%.For ReBiDet, the class-aware SA 3 Network leads to an increase of 0.54% in AP50 and 0.85% in AP75, contrasting with the previous results where the class-agnostic strategy showed higher effectiveness.The augmented dataset, despite its imbalances, now provides sufficient instances for each class, making the class-aware strategy more effective.Therefore, while the classagnostic strategy of the SA 3 Network is more suitable for datasets with significant class imbalances, the class-aware strategy proves advantageous for datasets with adequate instances for each class, even if imbalances exist.

Ablation Experiments of EAS Loss
Initially, we performed ablation experiments using ReDet as the baseline model to assess the effectiveness of the EAS loss function.Table 4 compares the performance of the ReDet and ReDet + SA 3 models, both with and without the EAS loss.This preliminary verification indicates that the proposed EAS loss function improves the model's detection performance.The evaluation metrics are defined as previously described.The results reveal that both baseline models, ReDet and ReDet + SA 3 , exhibit varying degrees of improvement in mAP, AP50, and AP75 with the adoption of the EAS loss.Specifically, ReDet shows a 0.60% increase in AP50 and a 0.18% increase in AP75.For ReDet + SA 3 , the class-aware strategy significantly enhances performance, with AP50 increasing by 1.10% and AP75 by 1.60%.Further ablation experiments were conducted using ReBiDet as the baseline model to corroborate the effectiveness of the EAS loss function.Table 5 presents the performance comparison of the ReBiDet + SA 3 models with and without EAS loss.Similar to the ReDet results, the ReBiDet + SA 3 model exhibits notable improvements under the class-aware strategy when utilizing EAS loss: AP50 increases by 1.11%, AP75 by 1.38%, and mAP by 1.63%.The class-agnostic strategy shows smaller improvements, with AP75 and mAP increasing by 0.80% and 0.35%, respectively, while AP50 decreases by 0.62%, consistent with the results obtained with the ReDet model.This observed phenomenon is not coincidental.The EAS loss function facilitates more comprehensive training of the model's bounding box regression branch, whereas the class-agnostic strategy treats all categories as a single class, which can be less effective when training samples are insufficient.This fundamental conflict between the mechanisms explains the reduced generalization capability of the SA 3 Network under the class-agnostic strategy when influenced by EAS loss.
These experimental results indicate that the EAS loss function enhances the training effectiveness of the model's bounding box regression branch and optimizes the SA 3 Network, particularly improving the learning efficiency of the class-aware strategy.This ensures that the model can be effectively trained even with imbalanced categories and fewer samples.
We then evaluated the performance of the EAS loss function on a dataset with a larger number of training samples by applying random rotation and offline multi-scale augmentation to the DOTA-v1.5 dataset.Initially, ablation experiments were conducted using ReDet + SA 3 as the baseline model.Given that the class-agnostic strategy performs relatively poorly on the unaugmented DOTA-v1.5 dataset, we employed the class-aware strategy for SA 3 in this case.Table 6 compares the performance of the ReDet + SA 3 models with and without EAS loss.The results show slight improvements across all performance indicators: AP50 increased by 0.25%, AP75 by 0.16%, and mAP by 0.36%.These improvements are significantly less than those observed with the unaugmented DOTA-v1.5 dataset.Similarly, ablation experiments using ReBiDet + SA 3 as the baseline model were conducted, maintaining the class-aware strategy for SA 3 as explained above.Table 7 presents a performance comparison of the ReBiDet + SA 3 models with and without EAS loss.As with the ReDet + SA 3 model, the EAS loss yields minor improvements: AP50 increased by 0.35%, AP75 decreased by 0.12%, and mAP increased by 0.55%.These improvements are again notably smaller compared to those seen with the unaugmented DOTA-v1.5 dataset.The diminished advantage of the EAS loss function with an increased number of effective training samples is consistent with our previous observations.This effect is evident in both the ReDet + SA 3 and ReBiDet + SA 3 models, with the latter exhibiting stronger feature extraction capabilities.The results suggest that enhanced feature extraction and sample selection strategies cannot maintain the significant advantage of EAS loss.Nevertheless, the performance of both ReDet/ReBiDet + SA 3 models still benefits from the use of EAS loss.
In summary, the EAS loss function effectively improves the learning efficiency of the model's regression branch for bounding box angle regression.It ensures adequate training even with imbalanced categories and fewer samples.Specifically, the class-aware strategy of the SA 3 Network benefits significantly from the EAS loss, enhancing the performance metrics, such as AP50, AP75, and mAP.In scenarios with insufficient training samples for certain categories, the SA 3 Network does not need to choose between class-aware and class-agnostic strategies.As the number of effective training samples increases and each category has sufficient instances, the advantage of the EAS loss diminishes but remains relative to the Smooth L1 loss.These results validate the effectiveness of the EAS loss function in various scenarios.

Multi-IoU Threshold Comparison Experiment on the DFShip Dataset
The DOTA series datasets, depending on the version, include 15 or 16 categories, such as airplanes and cars, with ships being one of the categories.To further demonstrate the effectiveness of the proposed solutions, design concepts, and research methods in addressing ship detection issues, we conducted validation experiments on the DFShip dataset, which specializes in ship detection.This subsection provides a horizontal comparison of the ReBiDet + SA 3 + EAS model proposed in this paper with other state-of-the-art models on the DFShip dataset.We selected and reproduced several leading models from the DOTA series datasets for this comparison, including CSL [26], R3Det [12], S2A-Net [25], Oriented R-CNN [22], and our baseline model ReDet [23].These models are among the most advanced in the field.Due to the unavailability of annotated test data from the official source, we split the original training set into training and test sets in a 4:1 ratio for the experiments, focusing on the precision of generated bounding boxes, specifically mAP at high IoU thresholds.
Table 8 presents the experimental results.At low threshold conditions, such as IoU = 0.5, the performance advantage of our proposed model over other advanced models is not significant.This is partly due to the dataset characteristics, which include clear images, accurate annotations, and a large number of training samples, all of which generally enhance the detection performance of the models.However, under high threshold conditions, such as IoU = 0.75, our model demonstrates a clear advantage with a detection accuracy of 98.28%, outperforming all other models in the comparison and surpassing the baseline model ReDet by 2.22%.The detection accuracy at IoU = 0.75 is only 0.56% lower than at IoU = 0.5.Note: The mAP is calculated using the all-point interpolation method.The red bold font represents the highest detection accuracy value at the same threshold in the horizontal comparison.
At an even higher threshold of IoU = 0.85, the detection accuracy of ReBiDet + SA 3 + EAS remains robust at 93.18%, while the performance of all other models significantly declines.[40], Faster R-CNN OBB (FR-O) [37], Mask R-CNN [30], and Hybrid Task Cascade (HTC) [29] results are based on a reproduced version of DOTA-v1.5 [38] and have been used by some scholars [23,43]."Single-scale" indicates the model is directly trained and tested on the DOTA-v1.5 dataset, while "multi-scale" indicates the model is trained and tested using random rotation and offline multi-scale enhancement on DOTA-v1.5.For ease of reading and comparison, the first, second, and third highest values in each column are marked in red, yellow, and green, respectively, and are bolded.

Discussion
The experimental results confirm that the proposed SA 3 Network demonstrates excellent precision and localization performance in detecting rotated objects.The EAS loss function, designed to enhance edge perception of inclined bounding boxes, significantly improves the model's learning efficiency in rotated object detection tasks.This leads to more accurate localization of detection boxes, highlighting the effectiveness of the design approach and methodology presented in this paper.
The SA 3 Network incorporates a cascaded regression branch.Initially, a coarse regression branch converts horizontal bounding boxes generated by the Region Proposal Network (RPN) into rotated bounding boxes based on the features of the detected objects.Depending on the task scenario, the network employs either a class-aware or class-agnostic strategy.Fine regression and refinement branches further optimize the angle parameters of the rotated bounding boxes, thereby enhancing the fitting accuracy of the final detection boxes.
The inclusion of EAS loss in the angle regression branch introduces an Intersection over Union (IoU) factor, which mitigates the mismatch between traditional loss functions and evaluation metrics.This results in overall improvements across various detection accuracy metrics.The EAS loss adjusts the function gradient of the angle regression branch, addressing the issue of limited learning when the predicted box angle is close to the true target angle.Consequently, the model becomes more sensitive towards the end of the angle regression branch, producing more accurate predicted box angles and significantly improving the AP75 accuracy metric.
Figure 14 illustrates the detection results for the same port remote sensing image.In Figure 14a, the detection results of the ReBiDet model are shown.The ReBiDet model struggles with accurate bounding box localization for elongated objects, such as ships, due to issues with discontinuous boundaries.Figure 14b displays the results after integrating the SA 3 Network.It is evident that ReBiDet + SA 3 generates more precise bounding boxes for ships and docks, and improves detection confidence for the ships in the upper-right corner and the dock in the middle-lower part of the image.Additionally, the improved localization accuracy leads to a higher detection rate and a lower false detection rate.After incorporating the SA 3 Network, the harbor in the middle-upper part of the image is correctly detected, and previously misidentified objects on the harbor are now accurately classified as irrelevant.However, the proposed method has some limitations concerning computational parameters and inference speed.The ReBiDet + SA 3 + EAS model increases the number of computational parameters by 13.99 M compared to the baseline ReBiDet model.While the EAS loss itself does not significantly contribute to this increase, the additional parameters primarily result from the SA 3 Network.This increase in computational parameters leads to an additional 3.5 ms per image on an RTX4090 platform, corresponding to a decrease of 1.8 FPS.Although these computational trade-offs are acceptable in many scenarios given the improvements in detection accuracy, reducing computational parameters and enhancing inference speed while maintaining high detection accuracy remains a critical area for future research.
In conclusion, the methods proposed in this paper are highly effective in improving the detection accuracy of randomly oriented objects, particularly those with elongated contour features, in remote sensing applications.These advancements provide valuable insights for enhancing ship detection capabilities in optical remote sensing images.

Conclusions
This paper addresses the challenges associated with significant deviations in final detection boxes due to a wide range of angles, as well as the imprecision inherent in traditional angle regression losses.To tackle these issues, we propose the SA 3 Network and EAS loss.The SA 3 Network employs a hierarchical regression structure that includes coarse, fine, and refinement stages to progressively optimize the angle parameters of rotated bounding boxes.The EAS loss introduces the SkewIoU factor, calculated using Gaussian transformation, to enhance the precision of angle regression losses.This approach improves both training efficiency and model performance, particularly under high IoU threshold conditions.
Experimental results validate the effectiveness of the SA 3 Network and EAS loss.The proposed methods significantly improve detection accuracy, especially for rotated objects in optical remote sensing images.
Future work will focus on enhancing the interpretability of rotation-equivariant convolutional neural networks.Understanding the operational mechanisms of these networks presents a significant research opportunity.Our goal is to gain a more intuitive understanding of the features extracted by these networks.We aim to explore techniques for visualizing rotation-equivariant features, which will facilitate a deeper analysis of their limitations and potential improvement strategies.

Figure 1 .
Figure 1.Prediction box generation method under le90 definition and CCW representation conditions.(a) Ideal regression path for generating prediction boxes.(b) Initial position of the proposal.(c) Actual regression path for generating prediction boxes.

9 Figure 2 .
Figure 2. Relationship curve between angular difference and IoU for rectangles with a 1:6 aspect ratio and overlapping centroids.

Figure 3 .
Figure 3. Process of generating predicted boxes by the Spatially Adaptive Angle-aware Network.

Figure 5 .
Figure 5. Structure diagram of the class-agnostic strategy regression function in the coarse regression stage.

Figure 6 .
Figure 6.Structure diagram of class-aware strategy regression function in the fine-tuning and precision refinement stages.

Figure 7 .
Figure 7. Curve depicting the relationship between IoU loss and angle difference.

Figure 8 .
Figure 8. Curve depicting the relationship between EAS loss and angle.

Figure 9 .
Figure 9. Transformed Gaussian distribution of rotated rectangular boxes.

Figure 10 .
Figure 10.The overlapping area I of two Gaussian distributions.

Figure 11 .
Figure 11.Distribution of various object classes in the DOTA-v1.5 training and validation sets.

Figure 12 .
Figure 12.Distribution of various object classes in the augmented DOTA-v1.5 training and validation sets.

Figure 14 .
Figure 14.Detection results on an image from the DOTA-v1.5 dataset.(a) Detection result of ReBiDet.(b) Detection result of the proposed ReBiDet + SA 3 .

Table 1 .
Experimental results of the ReBiDet model and KFIoU loss on the DOTA-v1.5 dataset.

Table 2 .
Experimental results of the SA 3 Network with two strategies on the DOTA-v1.5 dataset.

Table 3 .
Experimental results of the SA 3 Network with two strategies on the augmented DOTA-v1.5 dataset.
* Denotes the detection results reproduced on the experimental platform in this paper.Note: The training and inference of models in this table were conducted using DOTA-v1.5, with both random rotation augmentation and offline multi-scale augmentation applied during training and inference.

Table 4 .
EAS loss experiment results based on the ReDet model in the DOTA-v1.5 dataset.

Table 5 .
Experimental results of EAS loss on the ReBiDet model in the DOTA-v1.5 dataset.

Table 6 .
Experimental results of EAS loss on the ReDet model in the augmented DOTA-v1.5 dataset.

Table 7 .
Experimental results of EAS loss on the ReBiDet model in the augmented DOTA-v1.5 dataset.

Table 8 .
Horizontal comparison of model performance on the DFShip dataset at IoU thresholds from 0.5 to 0.95.